let divone = document.querySelectorAll(".divone")
let index = 0

divone[0].style.display = "block"
time = setInterval(function (){
    index ++
    if (index > 2) {
        index = 0
    }
    divone.forEach(function (v,i){
        v.style.display = "none"
    })
    divone[index].style.display = "block"
},1000)

let liArr = document.querySelectorAll(".list-li li")
console.log(liArr);
let imgName;

liArr.forEach(function (v,i){
    v.onmouseover = function(){
        //获取src的值
        //最后一个/的下标开始
        let startIndex = v.children[0].src.lastIndexOf("/")
        let endIndex = v.children[0].src.lastIndexOf(".")
        imgName = v.children[0].src.slice(startIndex+1,endIndex)
        v.children[0].src = `../imgs/${imgName}-c.svg`
    }
    v.onmouseout = function(){
        v.children[0].src = `../imgs/${imgName}.svg`
    }
})